home *** CD-ROM | disk | FTP | other *** search
/ IRIX Patches 1995 June / SGI IRIX Patches 1995 Jun.iso / 5.3_patches / patchSG0000499 / patchSG0000499.idb / usr / include / abi / X11 / XShmTrans.h.z / XShmTrans.h
Encoding:
C/C++ Source or Header  |  1995-06-12  |  1.4 KB  |  39 lines

  1. #ifndef _XSHMTRANS_H_
  2. #define _XSHMTRANS_H_
  3. #define SGI_SHM_FILENAME "/usr/tmp/.Xshmtrans"
  4.  
  5. typedef struct _connhdr {
  6.     ulock_t clientlock;            /* spinlock to single thread startup */
  7.     usema_t *syncsema;            /* semaphore for synchronization */
  8.     usema_t *syncsema2;            /* semaphore for synchronization */
  9.     unsigned char *arenahdr;        /* used for passing per/client arena */
  10. } connhdr_t;
  11.  
  12. typedef struct _arenahdr {
  13.     unsigned char *shmbuf;        /* start of buffer */
  14.     unsigned char *shmbufend;        /* end of buffer */
  15.  
  16.     volatile int fullflag;        /* buffer is full flag */
  17.     volatile int emptyflag;        /* buffer is empty flag */
  18.  
  19.     usema_t *fullsema;            /* semaphore for full flag */
  20.     usema_t *emptysema;            /* semaphore for empty flag */
  21.  
  22.     ulock_t headlock;            /* spinlock to protect head ptr */
  23.     ulock_t taillock;            /* spinlock to protect tail ptr */
  24.  
  25.     volatile unsigned char *headptr;    /* head of valid data */
  26.     volatile unsigned char *tailptr;    /* tail of valid data */
  27. } arenahdr_t;
  28.  
  29. typedef struct _shmdata {
  30.     usptr_t *arena;            /* shared arena */
  31.     arenahdr_t *arenahdr;        /* shared data structures */
  32.     connhdr_t *connhdr;            /* server connection header */
  33.     unsigned char *curreqptr;        /* pointer to start of current req. */
  34.     unsigned char *reqendptr;        /* pointer to end of current request */
  35.     unsigned char *halfptr;        /* pointer to end of current request */
  36.     int pid;
  37. } shmdata_t;
  38. #endif /* _XSHMTRANS_H_ */
  39.